package com.isoft.airportsystem.service.impl;


import com.isoft.airportsystem.entity.BLLS.DFLT_BLLS;
import com.isoft.airportsystem.entity.META;
import com.isoft.airportsystem.mapper.BLLSMapper;
import com.isoft.airportsystem.mapper.MetaMapper;
import com.isoft.airportsystem.service.BllsService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.UUID;

@Service
public class BllsServiceImpl implements BllsService {
    @Resource
    private BLLSMapper bllsMapper;

    @Resource
    private MetaMapper metaMapper;
    @Override
    public Integer add(DFLT_BLLS blls, META meta) {
        String metaid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
        if(!blls.getBelt().isEmpty()){
            bllsMapper.add(blls, metaid);
        }else{
            bllsMapper.addEmpy(blls, metaid);
        }
        metaMapper.add(meta, metaid);
        return null;
    }
}
